Technical Q&A

HW 40 - Changing the configuration variable in Open Firmware (15-February-99)


Q: How do you change a configuration variable?

A: You can change any configuration variable using the Open Firmware user interface, using the setenv word to do so. The syntax is:

setenv <name> <value>

Name is the configuration variable name, or any name you wish to create. Value is the value of name. For example:

setenv my-value 3

creates a new configuration variable named my-value and sets it to the string 3. If you then enter printenv to view these variables, you will notice that there is indeed a new variable called my-value, but its value is 33. That is, the variable my-value was set to ASCII 3, which is 33 hex.


-- Wayne Flansburg
Worldwide Developer Technical Support

Technical Q&As | Contents
Previous Question | Next Question

To contact us, please use the Contact Us page.